package com.lyncs.ods.modules.share.strategy;

import com.alibaba.fastjson.JSONObject;
import com.lyncs.ods.modules.company.service.CompanyService;
import com.lyncs.ods.modules.share.model.InviteCompanyVO;
import com.lyncs.ods.modules.share.model.TxnShareVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Objects;

/**
 * @author alex
 * @date 2022/4/21 22:21
 * @description
 */
@Component("companyStrategy")
public class CompanyStrategy extends ShareStrategy {

    @Autowired
    private CompanyService companyService;

    @Override
    public Object handle(String data) {
        InviteCompanyVO inviteCompanyVO = JSONObject.parseObject(data, InviteCompanyVO.class);
        return companyService.getCompanyDetailInfo(inviteCompanyVO.getCompanyId(), null);
    }
}
